package com.jeesite.modules.exam.quota.dao;

import com.jeesite.common.dao.CrudDao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import com.jeesite.modules.exam.quota.dto.ExamQuotaDataDto;
import com.jeesite.modules.exam.quota.dto.VersionInfoDto;
import com.jeesite.modules.exam.quota.entity.DcSupExamDetailFile;
import com.jeesite.modules.exam.quota.entity.DcSupExamSumQuota;
import com.jeesite.modules.exam.quota.entity.DcSupExamSumQuotaInfo;
import io.lettuce.core.dynamic.annotation.Param;

import java.util.List;
import java.util.Map;


/**
 * 考核任务指标汇总表DAO接口
 * @author xhc
 * @version 2022-06-09
 */
@MyBatisDao
public interface DcSupExamSumQuotaInfoDao extends CrudDao<DcSupExamSumQuotaInfo> {

    /**
     * 考核任务指标汇总表-主表
     * @param examId 任务id
     * @param examOrg 考核机构代码
     * @param version 版本
     * @return
     */
    List<ExamQuotaDataDto> queryExamSumQuotaData(@Param("examId") String examId, @Param("examOrg") String examOrg,@Param("examYear") String examYear, @Param("version") Long version,@Param("quotaType") String[] quotaType);

    /**
     * 考核任务指标汇总表-主表-指标汇总导出添加
     * @param examId 任务id
     * @param examOrg 考核机构代码
     * @param version 版本
     * @return
     */
    List<ExamQuotaDataDto> queryExamSumQuotaData(@Param("examId") String examId, @Param("examOrg") String examOrg,@Param("examYear") String examYear, @Param("version") Long version,@Param("quotaType") String[] quotaType,@Param("quotaGroup") String quotaGroup);

    /**
     *  查询 考核任务指标表-报送-主表
     * @param examId 任务id
     * @param examOrg 考核机构代码
     * @param version 版本
     * @return
     */
    List<ExamQuotaDataDto> queryExamQuota(@Param("examId") String examId,@Param("examOrg") String examOrg,@Param("examYear") String examYear,@Param("version") String version,@Param("quotaType") String[] quotaType);

    /**
     *  查询 考核任务指标表-报送-主表-指标汇总导出添加
     * @param examId 任务id
     * @param examOrg 考核机构代码
     * @param version 版本
     * @return
     */
    List<ExamQuotaDataDto> queryExamQuota(@Param("examId") String examId,@Param("examOrg") String examOrg,@Param("examYear") String examYear,@Param("version") String version,@Param("quotaType") String[] quotaType,@Param("quotaGroup") String quotaGroup);

    /**
     * 查询 版本信息
     * @param examId 任务id
     * @param examOrg 考核机构代码
     * @return
     */
    List<VersionInfoDto> queryExamVersion(@Param("examId") String examId, @Param("examOrg") String examOrg, @Param("examYear") String examYear);


    List<DcSupExamSumQuotaInfo> findKeyPageList(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    List<DcSupExamSumQuotaInfo> findDanPageList(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);


    Integer queryCopyVersionByExamIdRemark4(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    DcSupExamSumQuota queryVerisonByExamIdVersion(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    List<ExamQuotaDataDto> queryExamSumQuotaDataByCopy(@Param("examId") String examId, @Param("examOrg") String examOrg,@Param("examYear") String examYear, @Param("version") Long version,@Param("quotaType") String[] quotaType);

    DcSupExamSumQuota queryExamQuotaCopy(DcSupExamSumQuota dcSupExamSumQuota);

    DcSupExamSumQuota queryExamQuotaCopyVersion(@Param("dcSupExamSumQuota")DcSupExamSumQuota dcSupExamSumQuota,@Param("type") String type);
    // 查询发布信息
    DcSupExamSumQuota queryPublish(DcSupExamSumQuota dcSupExamSumQuota);
    // 查询指标展示
    List<ExamQuotaDataDto> quotaPlayListData(ExamQuotaDataDto examQuotaDataDto);
//    查询指标分类汇总数据信息
    List<Map<String,Object>> groupByQuotaTypeCount(ExamQuotaDataDto examQuotaDataDto);
    // 指标展示看板列表
    List<ExamQuotaDataDto> findQuotaResults(ExamQuotaDataDto examQuotaDataDto);
    // 根据id 查询指标信息
    List<DcSupExamSumQuotaInfo> queryExamQuotaInfoByIds(List<String> ids);

    List<DcSupExamSumQuotaInfo> findSinglePage(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    List<DcSupExamSumQuotaInfo> findSingleOrgPage(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    List<DcSupExamDetailFile> listDetailFileData(DcSupExamDetailFile dcSupExamSumQuotaInfo);

    void updateFileStatusDetail(String id, String detailFile,String updateBy);

    List<DcSupExamSumQuotaInfo> findDcSupExamSumQuotaInfoList(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    List<DcSupExamSumQuotaInfo> findReleaseDcSUpExamSumQuotaInfo(DcSupExamSumQuotaInfo dcSupExamSumQuotaInfo);

    int deleteSumInfo(List<String> collect);

    int deleteSumOrg(List<String> collect);
}